package org.scct.chenhui;

import org.scct.chenhui.dao.BookPublishDao;
import org.scct.chenhui.dao.BookTypeDao;
import org.scct.chenhui.model.BookPublishBean;
import org.scct.chenhui.model.BookTypeBean;
import org.scct.chenhui.model.UserBean;

import java.util.ArrayList;
import java.util.List;

public class Main2 {
    public static void main(String[] args) {

//        String []strs={"jack","tom","lucy"};
//        int[] ints={12,3,4,4,5};
//        for (String str : strs) {
//            System.out.println(str);
//        }
//        UserBean [] ubs={new UserBean(),new UserBean()};
//        集合类
//        List lst = new ArrayList();
//
//        ArrayList lst2 = (ArrayList) lst;
//        lst.add(new Integer(10));
//        lst.add(new UserBean());
//
//
//        List<UserBean> lst3 = new ArrayList<>();
////        lst3.add(new Integer(10));
//        lst3.add(new UserBean());
        BookPublishDao bookPublishDao = new BookPublishDao();
        List<BookPublishBean> allPubliser = bookPublishDao.getAllPubliser();
        for (BookPublishBean bookPublishBean : allPubliser) {
            System.out.println(bookPublishBean);
        }

        BookTypeDao bookTypeDao = new BookTypeDao();
        List<BookTypeBean> allTypes = bookTypeDao.getAllTypes();
        for (BookTypeBean allType : allTypes) {
            System.out.println(allType);
        }
    }
}
